package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.LeaveOutMapper;
import com.ruoyi.system.domain.LeaveOut;
import com.ruoyi.system.service.ILeaveOutService;
import com.ruoyi.common.core.text.Convert;

/**
 * 请假Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-15
 */
@Service
public class LeaveOutServiceImpl implements ILeaveOutService 
{
    @Autowired
    private LeaveOutMapper leaveOutMapper;

    /**
     * 查询请假
     * 
     * @param leaveID 请假主键
     * @return 请假
     */
    @Override
    public LeaveOut selectLeaveOutByLeaveID(Long leaveID)
    {
        return leaveOutMapper.selectLeaveOutByLeaveID(leaveID);
    }

    /**
     * 查询请假列表
     * 
     * @param leaveOut 请假
     * @return 请假
     */
    @Override
    public List<LeaveOut> selectLeaveOutList(LeaveOut leaveOut)
    {
        return leaveOutMapper.selectLeaveOutList(leaveOut);
    }

    /**
     * 新增请假
     * 
     * @param leaveOut 请假
     * @return 结果
     */
    @Override
    public int insertLeaveOut(LeaveOut leaveOut)
    {
        return leaveOutMapper.insertLeaveOut(leaveOut);
    }

    /**
     * 修改请假
     * 
     * @param leaveOut 请假
     * @return 结果
     */
    @Override
    public int updateLeaveOut(LeaveOut leaveOut)
    {
        return leaveOutMapper.updateLeaveOut(leaveOut);
    }

    /**
     * 批量删除请假
     * 
     * @param leaveIDs 需要删除的请假主键
     * @return 结果
     */
    @Override
    public int deleteLeaveOutByLeaveIDs(String leaveIDs)
    {
        return leaveOutMapper.deleteLeaveOutByLeaveIDs(Convert.toStrArray(leaveIDs));
    }

    /**
     * 删除请假信息
     * 
     * @param leaveID 请假主键
     * @return 结果
     */
    @Override
    public int deleteLeaveOutByLeaveID(Long leaveID)
    {
        return leaveOutMapper.deleteLeaveOutByLeaveID(leaveID);
    }
}
